Skip to content

fix(settings): make recommended model one click and prefer on-disk - #781

Draft
jatinkrmalik wants to merge 3 commits into
mainfrom
fix/778-recommended-model-action
Draft

fix(settings): make recommended model one click and prefer on-disk#781
jatinkrmalik wants to merge 3 commits into
mainfrom
fix/778-recommended-model-action

Conversation

@jatinkrmalik

Copy link
Copy Markdown
Member

Summary

Speech Model showed a recommended model as a dead label. You had to map "Small EN" onto Model Size and Specialization yourself, and it was easy to download a fresh weight when a same-size one was already local.

  • Recommendation is a button that sets size and specialization together.
  • Before a whisper.cpp download, if a same-size specialization is already on disk, Settings offers that instead.
  • Model Size rows now show weight and a downloaded marker, matching Specialization.

Test plan

  • Open Settings → Speech Model with whisper.cpp; pick something other than the recommendation; confirm the "Use recommended: …" control is a button.
  • Click it; both dropdowns land on the recommended size and specialization.
  • With Small multilingual on disk and Small EN recommended/selected, confirm the offer dialog appears before download and "Use Small" applies without downloading.
  • Confirm Model Size entries show size + ✓/↓ like Specialization.
  • pytest tests/test_recommended_model_action.py

Fixes #778

Known limits

Comparable on-disk means the same size bucket only (not a larger leftover like Medium when Small is recommended). English-only leftovers are not offered when the language is not English.

The Speech Model panel printed a recommended size and specialization as
plain text, so applying it meant hunting through two dropdowns. Turning
that line into a button sets both at once.

Before a download starts, whisper.cpp now checks for a same-size weight
already on disk and offers it. The Model Size list also shows weight and
a downloaded marker the way Specialization already does.

Fixes #778
@netlify

netlify Bot commented Sep 5, 2026

Copy link
Copy Markdown

Deploy Preview for voca-linux canceled.

Name Link
🔨 Latest commit 7516499
🔍 Latest deploy log https://app.netlify.com/projects/voca-linux/deploys/6a9c72b6b41c780008470c1e

@github-actions github-actions Bot added app Core Python application (src, packaging) tests Test suite changes labels Sep 5, 2026
@codecov-commenter

Copy link
Copy Markdown

⚠️ Please install the 'codecov app svg image' to ensure uploads and comments are reliably processed by Codecov.

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@jatinkrmalik
jatinkrmalik marked this pull request as ready for review September 5, 2026 19:23
@greptile-apps

greptile-apps Bot commented Sep 5, 2026

Copy link
Copy Markdown

Greptile Summary

The PR turns the speech-model recommendation into a one-click action and offers compatible, same-size models already on disk before downloading another weight.

  • Adds weight and local-download indicators to whisper.cpp model-size options.
  • Adds recommendation selection across model size and specialization.
  • Adds comparable on-disk model selection to automatic and explicit apply flows.
  • Adds focused tests for labels, recommendation clicks, comparable-model ranking, and dialog responses.

Confidence Score: 4/5

The PR appears safe to merge, with only a non-blocking type-annotation convention violation in two new settings handlers.

The recommendation and on-disk selection paths continue into the existing reconfigure-and-save flows, while the only accepted concern is missing return annotations on newly added methods.

Files Needing Attention: src/vocalinux/ui/settings_dialog.py

Important Files Changed

Filename Overview
src/vocalinux/ui/settings_dialog.py Implements recommendation actions, model-size status labels, and comparable on-disk model selection; two new handlers omit repository-required return annotations.
tests/test_recommended_model_action.py Adds focused unit coverage for the recommendation and on-disk model-selection helpers and UI routing.

Flowchart

%%{init: {'theme': 'neutral'}}%%
flowchart TD
    A[User selects whisper.cpp model] --> B{Requested model downloaded?}
    B -- Yes --> F[Apply and save settings]
    B -- No --> C{Same-size compatible model on disk?}
    C -- No --> D[Begin requested-model download]
    C -- Yes --> E{User choice}
    E -- Use on-disk --> F
    E -- Download --> D
    E -- Cancel --> G[Restore saved model UI]
    D --> F
Loading

Reviews (1): Last reviewed commit: "fix(settings): make recommended model on..." | Re-trigger Greptile

Comment thread src/vocalinux/ui/settings_dialog.py
Greptile flagged the two new helpers for missing return types.
@jatinkrmalik
jatinkrmalik marked this pull request as draft September 5, 2026 19:44
@jatinkrmalik jatinkrmalik mentioned this pull request Sep 5, 2026
6 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

app Core Python application (src, packaging) tests Test suite changes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

The recommended model cannot be clicked

2 participants